"use strict";

function ShowScreen(){
	var data = GameUI.getEndData();
	$.Msg(data);
	for(var i in data){
		var q = data[i];
		var element = $.CreatePanel("Panel",$('#playerScore'),"finishInfo"+i);
		element.BLoadLayoutSnippet("finishInfo")
		var label1 = element.FindChildTraverse("lb_rank");
		var label2 = element.FindChildTraverse("lb_username");
		var label3 = element.FindChildTraverse("lb_gold");
		label1.text = i;
		label2.text = q.name;
		label3.text = q.gold;
	}
	$('#btn_quit').visible = true;
	$('#finishiGamePanel').visible = true;
}

//

(function()
{	
	$.Schedule( 1.00, ShowScreen );
})();